<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="container">
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
			<span class="sr-only">Toggle navigation</span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</button>
		<a class="navbar-brand" href="index.jsp"><bean:message key="header.hotel_name"/></a>
	</div>
	
	<div class="collapse navbar-collapse">
		<logic:present name="user" scope="session">        
			<p class="navbar-text pull-right">
				<bean:message key="header.logged_as"/> ${user.name} ${user.surname}
			</p>
			<ul class="nav navbar-nav pull-right">
				<li><a href="locale.do?lang=ru"><bean:message key="header.lang.ru"/></a></li>
				<li><a href="locale.do?lang=en"><bean:message key="header.lang.en"/></a></li>
			</ul>
		        
			<ul class="nav navbar-nav">
				<li><a href="profile.jsp"><bean:message key="header.profile"/></a></li>
				<li><a href="logout.do"><bean:message key="header.logout"/></a></li>
<!-- 				<li class="dropdown open"> -->
<!-- 					<a href="#" class="dropdown-toggle" data-toggle="dropdown"> -->
<%-- 						<bean:message key="header.lang"/> --%>
<!-- 						<b class="caret"></b> -->
<!-- 					</a> -->
<!-- 					<ul class="dropdown-menu"> -->
<%-- 						<li><a href="locale.do?lang=ru"><bean:message key="header.lang.ru"/></a></li> --%>
<%-- 						<li><a href="locale.do?lang=en"><bean:message key="header.lang.en"/></a></li> --%>
<!-- 					</ul> -->
<!-- 				</li> -->
			</ul>
		</logic:present>
		
		<logic:notPresent name="user" scope="session">
			<ul class="nav navbar-nav pull-right">
				<li><a href="locale.do?lang=ru"><bean:message key="header.lang.ru"/></a></li>
				<li><a href="locale.do?lang=en"><bean:message key="header.lang.en"/></a></li>
			</ul>
			
			<ul class="nav navbar-nav">
				<li><a href="login.jsp"><bean:message key="header.login"/></a></li>
				<li><a href="registrate.jsp"><bean:message key="header.registrate"/></a></li>
<!-- 				<li class="dropdown open"> -->
<!-- 					<a href="#" class="dropdown-toggle" data-toggle="dropdown"> -->
<%-- 						<bean:message key="header.lang"/> --%>
<!-- 						<b class="caret"></b> -->
<!-- 					</a> -->
<!-- 					<ul class="dropdown-menu"> -->
<%-- 						<li><a href="locale.do?lang=ru"><bean:message key="header.lang.ru"/></a></li> --%>
<%-- 						<li><a href="locale.do?lang=en"><bean:message key="header.lang.en"/></a></li> --%>
<!-- 					</ul> -->
<!-- 				</li> -->
			</ul>
		</logic:notPresent>
	</div><!-- /.nav-collapse -->
</div><!-- /.container -->